<template>
	<view>
		<u-cell-group>
			<u-cell-item title="提现申请编号" :arrow="false" :value="form.number"></u-cell-item>
			<u-cell-item title="流水编号" :arrow="false" :value="form.flownumber"></u-cell-item>
			<u-cell-item title="申请人" :arrow="false" :value="form.username"></u-cell-item>
			<u-cell-item title="提交日期" :arrow="false" :value="$u.timeFormat(form.createdate.replaceAll('-','/'), 'yyyy-mm-dd hh:MM:ss')"></u-cell-item>
			<u-cell-item title="申请状态" :arrow="false">
				<view slot="right-icon">
					<view v-if="form.state == '已到账'"><text class="color-success">{{form.state}}</text></view>
					<view v-if="form.state == '待审核'"><text class="color-warning">{{form.state}}</text></view>
					<view v-if="form.state == '已驳回'"><text class="color-danger" :title="form.reason">{{form.state}}</text></view>
					<view v-if="form.state == '打款出错'||form.state == '已审核'"><text class="color-danger">已审核</text></view> 
				</view>
			</u-cell-item>
		</u-cell-group>
		<view class="u-p-30" style="background-color: #fff; color: #606266;" v-if="form.reason">
			<text>驳回原因</text>
			<view class="u-p-t-30">
				<u-input v-model="form.reason" type="textarea" :border="true" :disabled="true" />
			</view>
		</view>
		<view class="u-p-30">
			<u-button @click="back">返回</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form:{}
			}
		},
		onLoad(opt) {
			this.getRecordDetails(opt.id)
		},
		methods: {
			getRecordDetails(id){
				this.$u.get('/User/MyApply/Views?id='+id).then((res)=>{
					this.form = res
				})
			},
			back(){
				uni.navigateBack()
			}
		}
	}
</script>

<style>

</style>
